I see that this thread is several years old... I'm having the same problem now with Xcode 14.2 under macOS 13.1 Ventura. I've tried the terminal commands above with no luck.
xcode-select --install tells me that the command line tools are already installed -- which makes sense, since I installed the Xcode 14.2 command line tools separately after installing Xcode itself.
I downloaded command line tools for macOS 10.14 and ran "open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg" which ran an installer. After restarting my Mac, I still get the following error when compiling for a macOS 10.13 target:
'CoreFoundation/CFString.h' file not found
In Xcode settings > Locations I have the Command Line Tools set to Xcode 14.2, which is the only available option.
Targeting macOS 10.14 or higher works fine, but I also need a build for 10.13.
I don't know if this is related, but I also get an error in __config line 1123 'No thread API'
Any suggestions would be much appreciated.
Topic:
Developer Tools & Services
SubTopic:
General
Tags: